<template>
  <div>
    <!-- 3.0 使用组件 -->
    <div class="top">
      <comp-header>
        <template v-slot:center>
          <span>Mred</span>
        </template> 
      </comp-header>
    </div>
    <comp-footer></comp-footer>
  </div>
</template>
<script>
import compHeader from "@/components/comp-header.vue";
import compFooter from "@/components/comp-footer.vue";

export default {
  data() {
    return {
      
    };
  },
  // 2. 注册组件
  components: {
    compHeader,
    compFooter,
  },
};
</script>

<style lang="scss" scoped>
.top {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
}
</style>
